file_name = 'text_files\\guest.txt'

with open(file_name,'w')  as file_object:
    name = input("Please enter your name")
    file_object.write(name)
